package com.example.myfirstapp;

import android.os.Bundle;
import android.view.View;
import android.widget.EditText;
import android.widget.TextView;

import androidx.appcompat.app.AppCompatActivity;
public class MainActivity extends AppCompatActivity{
    private static final String TAG ="FragmentActivity" ;
    private TextView out;
    private String inpstr;
    private EditText inp;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.first);
        out=findViewById(R.id.textView);
        inp= findViewById(R.id.editTextTextnumber);
    }
    public void myClick(View v){
        String inpstr=inp.getText().toString();
        Double inps=Double.parseDouble(inpstr)*1.8+32;
        out.setText(""+inps);
    }
}